package com.lucifer.cloud.boot.blog.config;

import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author lucifer
 * @date 2024/1/25 11:51
 */
//@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Resource
    private OperatePermissionInterceptor permissionInterceptor;


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(permissionInterceptor).addPathPatterns("/*/delete");
    }
}
